package com.frxuexi.mdm2205.demo

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

@Preview
@Composable
fun Demo02() {

    Box(contentAlignment= Alignment.TopEnd, modifier = Modifier.padding(20.dp)) {
        Text(
            text = "hello", modifier = Modifier
                .background(Color.Yellow, RoundedCornerShape(10.dp))
                .border(1.dp, Color.Blue, RoundedCornerShape(10.dp))
                .padding(vertical = 5.dp, horizontal = 10.dp)
//        .padding(start = 10.dp)
//        .padding(paddingValues = PaddingValues(10.dp))

        )
        Text(
            text = "1",
            color = Color.White,
            fontSize = 8.sp,
            modifier = Modifier/*.size(16.dp)*/.offset(3.dp,-5.dp).background(Color.Red, CircleShape).padding(3.dp)

        )
    }


}